#pragma once
#include "Entity.h"

#define AIMING_ERROR 10.00f
#define AIMING_VELOCITY 5.0f

class Enemy : public Entity
{
private:
	static enum ACTION 
	{
		IDLE,
		MOVE, 
		ATTACK,
		EVADE,
		PATROL // esto, probablemente no lo implementemos
	} action;	

	// known player position
	core::vector3df playerPos;
	// aiming direction
	core::vector3df direction;

	bool onSight;

public:
	// Called on update 
	void Update(float dt);

	// This is used to delete allocated things
	void Destroy();

	// its called when this unit collides with the ground
	void onCollide(Entity* e);

	// This function its called when the unti hits the map
	void onCollide();
	
	// Attacks destination position.
	void attack();

	inline void setAction(ACTION action);
	inline bool isOnSight(core::vector3df pos);

	Enemy(void);
	~Enemy(void);
};
